﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>




<title></title>
</head>



<div class="ibox-content">
	<form class="form-horizontal" id="dataform"
		onsubmit="javascripr:return false;">

		<div class="row">
			<h2 class="text-center">选择要发布的房源基本信息</h2>
		</div>
<br>
		<div class="form-group">
			<label class="col-sm-2 control-label">房屋类型</label>
			<div class="col-sm-4">
				<select onchange="changeSelect(this)" datatype="*" class="form-control autoFull " name="fyKinds"
					data-filed="name" data-value="name"
					data-url="${path}/admin/dataDictionary/showDataDictionary"
					data-param="{type:'房源类型'}">
					<option value=''>--请选房源类型--</option>
				</select>
			</div>
			<label class="col-sm-2 control-label">供求</label>
			<div class="col-sm-4">
				<select datatype="*" id="gq" class="form-control" size="1" name="fyGq">
				</select>
			</div>
		</div>
		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:;" onclick="myForm.submit()"
					class="btn btn-success radius">开始发布</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<button onclick="MTools.closeForm()" class="btn btn-danger radius"
					type="button">取消</button>
			</div>
		</div>
		
		
	</form>
</div>
<script type="text/javascript">
MTools.autoFullSelect();
	var myForm = MForm.initForm({
		invokeUrl : "${path}/admin/fy/addForm2",
		isAutoClose:false,
		afterSubmit : function(loj) {
			MTools.redirect("${path}/admin/redirect/"+loj.getValue("page"));
		},
	});

	
	function changeSelect(node){
		var nvalue=$(node).val();
		if(nvalue==''){return;}
		var cz="<option value='出租' >出租</option>";
		var qz="<option value='求租' >求租</option>";
		var cs="<option value='出售' >出售</option>";
		var qg="<option value='求购' >求购</option>";
		var zr="<option value='转让' >转让</option>";
		var html='';
		if(nvalue=='二手房'){
			html=cs+qg;
		}else if(nvalue=='写字楼'){
			html=cs+cz+qz+qg;
		}else if(nvalue=='出租房'){
			html=cz+qz;
		}else if(nvalue=='商铺'){
			html=cz+qz+cs+qg+zr;
		}else if(nvalue=='厂房'){
			html=cz+qz+cs+qg+zr;
		}
		$("#gq").html(html);
	}
	
</script>
</body>
</html>